# -*- coding: utf-8 -*-
import json
import requests
from wxpy import *
import json
import os,sys,md5

bot = Bot( cache_path=True)

with open('../dist/task.json') as file_object:
    contents = file_object.read()
    fileMd5=md5.new(contents).digest()
    print fileMd5
    taskList=json.loads(contents)
    task=taskList[-1]
    sendName=task['sendName']
    appName=task['appName']
    appSrc=task['appSrc']
    my_friend = bot.friends().search(sendName)[0]
    my_friend.send(u'App名称:'+appName+u'\n下载地址:'+appSrc)
